/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Exercicio2;

import Exercicio2.Factories.CarroFactory;
import Exercicio2.Produtos.Carro;

/**
 *
 * @author Pedro
 */
public class Cliente {

    private Carro carro;

    public void solicitaCarro(CarroFactory factory)
    {
       carro = factory.fabricaCarro();
       carro.motor = factory.fabricaMotor();
       carro.pneu = factory.fabricaPneu();
    }

    public void entrarNoCarro()
    {
      carro.entrar();
    }

    public void ligarMotor()
    {
      carro.motor.ligar();
    }

    public void furarPneu()
    {
      carro.pneu.furar();
    }
}
